# Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.15)
project(vphy)

find_package(common)
collector_create (PROJECT_LIB_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}")
collector_create (PROJECT_LIB_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}")
include_directories(${CMAKE_BINARY_DIR}/include)
collect (PROJECT_LIB_SOURCES xvphy_dp.c)
collect (PROJECT_LIB_HEADERS xvphy_dp.h)
collect (PROJECT_LIB_SOURCES xvphy_g.c)
collect (PROJECT_LIB_HEADERS xvphy_gt.h)
collect (PROJECT_LIB_SOURCES xvphy_gthe2.c)
collect (PROJECT_LIB_SOURCES xvphy_gthe3.c)
collect (PROJECT_LIB_SOURCES xvphy_gthe4.c)
collect (PROJECT_LIB_SOURCES xvphy_gtpe2.c)
collect (PROJECT_LIB_SOURCES xvphy_gtxe2.c)
collect (PROJECT_LIB_SOURCES xvphy_gtye4.c)
collect (PROJECT_LIB_SOURCES xvphy_hdmi_intr.c)
collect (PROJECT_LIB_SOURCES xvphy_hdmi.c)
collect (PROJECT_LIB_HEADERS xvphy_hdmi.h)
collect (PROJECT_LIB_HEADERS xvphy_hw.h)
collect (PROJECT_LIB_SOURCES xvphy_i.c)
collect (PROJECT_LIB_HEADERS xvphy_i.h)
collect (PROJECT_LIB_SOURCES xvphy_intr.c)
collect (PROJECT_LIB_SOURCES xvphy_log.c)
collect (PROJECT_LIB_SOURCES xvphy_mmcme2.c)
collect (PROJECT_LIB_SOURCES xvphy_mmcme3.c)
collect (PROJECT_LIB_SOURCES xvphy_mmcme4.c)
collect (PROJECT_LIB_SOURCES xvphy_selftest.c)
collect (PROJECT_LIB_SOURCES xvphy_sinit.c)
collect (PROJECT_LIB_SOURCES xvphy.c)
collect (PROJECT_LIB_HEADERS xvphy.h)
collector_list (_sources PROJECT_LIB_SOURCES)
collector_list (_headers PROJECT_LIB_HEADERS)
file(COPY ${_headers} DESTINATION ${CMAKE_BINARY_DIR}/include)
add_library(vphy STATIC ${_sources})
set_target_properties(vphy PROPERTIES LINKER_LANGUAGE C)
